package com.web.cms.doc.message;

import java.io.Serializable;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;

import javax.validation.constraints.NotBlank;

import com.blue.core.dict.CmsChannelType;
import com.blue.core.dict.CmsDocModel;
import com.blue.core.dict.State;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;

public class ChannelRequest implements Serializable
{
	private static final long serialVersionUID = 1L;

	@NotNull(groups = { UpdateModel.class }, message = "栏目ID不能为空")
	@Null(groups = { SaveModel.class }, message = "栏目ID必须为空")
	private Integer id;
	private Integer parentId;
	@NotNull(groups = { SaveModel.class }, message = "网站ID不能为空")
	private Integer webId;
	@Size(min = 0, max = 20, groups = { SaveModel.class, UpdateModel.class }, message = "栏目标识长度[0-20]")
	private String code;
	@NotBlank(groups = { SaveModel.class, UpdateModel.class }, message = "栏目名称不能为空")
	@Size(min = 0, max = 50, groups = { SaveModel.class, UpdateModel.class }, message = "栏目名称长度[0-50]")
	private String name;
	@Size(min = 0, max = 200, groups = { SaveModel.class, UpdateModel.class }, message = "栏目描述长度[0-200]")
	private String descp;
	private Integer docs;
	private CmsChannelType type;
	private CmsDocModel model;
	private Integer sort;
	private State state;

	public ChannelRequest()
	{
	}

	public Integer getId()
	{
		return id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public Integer getParentId()
	{
		return parentId;
	}

	public void setParentId(Integer parentId)
	{
		this.parentId = parentId;
	}

	public Integer getWebId()
	{
		return webId;
	}

	public void setWebId(Integer webId)
	{
		this.webId = webId;
	}

	public String getCode()
	{
		return code;
	}

	public void setCode(String code)
	{
		this.code = code;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getDescp()
	{
		return descp;
	}

	public void setDescp(String descp)
	{
		this.descp = descp;
	}

	public Integer getDocs()
	{
		return docs;
	}

	public void setDocs(Integer docs)
	{
		this.docs = docs;
	}

	public CmsChannelType getType()
	{
		return type;
	}

	public void setType(CmsChannelType type)
	{
		this.type = type;
	}

	public CmsDocModel getModel()
	{
		return model;
	}

	public void setModel(CmsDocModel model)
	{
		this.model = model;
	}

	public Integer getSort()
	{
		return sort;
	}

	public void setSort(Integer sort)
	{
		this.sort = sort;
	}

	public State getState()
	{
		return state;
	}

	public void setState(State state)
	{
		this.state = state;
	}

}
